<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <com.google.android.material.appbar.AppBarLayout
        android:id="@+id/app_bar"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <dev.tinelix.jabwave.ui.views.base.JabwaveActionBar
            android:id="@+id/actionbar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="?attr/actionBarColor"
            android:minHeight="?attr/actionBarSize"
            android:theme="@style/ApplicationTheme.Toolbar.Dark"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:navigationIcon="@drawable/ic_back"
            app:title="@string/app_name"
            app:contentInsetLeft="0dp"
            app:contentInsetStart="0dp"
            app:contentInsetStartWithNavigation="0dp">

            <include layout="@layout/layout_actionbar"/>

        </dev.tinelix.jabwave.ui.views.base.JabwaveActionBar>
    </com.google.android.material.appbar.AppBarLayout>

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/messages_list"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:background="?attr/msgrBackgroundColor"
        app:layout_constraintBottom_toTopOf="@+id/message_editor_panel"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.0"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/app_bar"
        app:reverseLayout="true"
        app:stackFromEnd="true">

    </androidx.recyclerview.widget.RecyclerView>

    <dev.tinelix.jabwave.ui.views.base.XConstraintLayout
        android:id="@+id/message_editor_panel"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent">

        <dev.tinelix.jabwave.ui.views.MessageEditor
            android:id="@+id/message_editor"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />
    </dev.tinelix.jabwave.ui.views.base.XConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>